﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace FrameDisplayClient.UI.ScreenSender
{
    public partial class StopScreenSenderControl : UserControl
    {
        private ScreenSenderWorker screenSenderWorker;

        public StopScreenSenderControl()
        {
            InitializeComponent();
        }

        public void SetScreenSenderWorker(ScreenSenderWorker screenSenderWorker)
        {
            this.screenSenderWorker = screenSenderWorker;
        }

        private void buttonStop_Click(object sender, EventArgs e)
        {
            this.screenSenderWorker.Stop();

            this.Parent.Controls.Remove(this);
            this.Dispose();
        }
    }
}
